home *** CD-ROM | disk | FTP | other *** search
- Path: zib-berlin.de!inf2hro!honshu!gnikl
- From: gnikl@informatik.uni-rostock.de (Gunther Nikl)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: C compiler problem
- Date: 30 Jan 1996 19:53:42 GMT
- Organization: University of Rostock
- Message-ID: <4elt06$cr@taiwan.informatik.uni-rostock.de>
- References: <4ek3b2$a5k@nntp.novia.net>
- NNTP-Posting-Host: honshu.informatik.uni-rostock.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Tony Syslo (tsyslo@oasis.novia.net) wrote:
- > I have a friend who is converting a CNET BBS game from ARREX to C.
- > Here is his request:
-
- > Can anyone tell me why this program is not compiling?
- > I am using SAS/C 6.50, and am getting a BPTR error on line 35 with the
- > "struct FileHandle *".
-
- > struct FileHandle *file_handle;
-
- should be "BPTR file_handle"
-
- > file_handle=(struct FileHandle *)Open(...);
-
- Remove the cast, Open() returns a BPTR
-
- > if(file_handle==NULL)
- > {
- > printf("Could not open the file!\n");
- > Exit(0);
-
- Never use Exit() from the dos.library. It will _bypass_ your
- compilers exit-code! Use *exit()*.
-
- BTW, its not a bright idea to mix AmigaDOS calls and c-library
- calls. When using printf() you can also use fopen(),fread(),etc
- for the file stuff.
-
- Gunther
-